import Vue from 'vue'
import VueRouter from 'vue-router'





Vue.use(VueRouter)

const Home = () => import(/* webpackChunkName: "home" */ '../views/Home/Home.vue')

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },

  {
    path: "/aboutme",
    component: resolve => require(["../views/Regard.vue"], resolve),
    meta: {
      title: "关于我"
    }
  },
  {
    path: "/message",
    component: resolve => require(["../views/Leaveword.vue"], resolve),
    meta: {
      title: "留言板"
    }
  },
  {
    path: "/technology",
    component: resolve => require(["../views/Technolgy.vue"], resolve),
    meta: {
      title: "技术"
    }
  },
  {
    path: "/essay",
    component: resolve => require(["../views/Essay.vue"], resolve),
    meta: {
      title: "随笔"
    }
  },
  {
    path: "/article/:articleId",
    component: resolve => require(["../views/Article.vue"], resolve)
  },
  {
    path: "/essaycon/:essayId",
    component: resolve => require(["../views/EssayCon.vue"], resolve)
  },
  // {
  //   path: "/music",
  //   component: resolve => require(["../views/Music.vue"], resolve)
  // },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]



const router = new VueRouter({
  routes,

})

export default router
